package day1;

/**
 * @author pacai
 * @version 1.0
 */
public class RantToRant {


    public static int f1(){
        return (int)(Math.random() * 4) + 1;
    }

    public static int f2(){
        int ans = 0;
        do{
            ans = f1();
        }while(ans == 3);
        return ans < 4 ? 0 : 1;
    }

    public static int f3(){
        return (f2() << 2) + (f2() << 1) + f2();
    }

    public static int g(){
        int ans = 0;
        do{
            ans = f3();
        }while(ans == 0);
        return ans;
    }


    public static void main(String[] args) {
        int times = 100000000;
        int[] counts = new int[8];
        for (int i = 0; i < times; i++) {
            int ans = g();
            counts[ans]++;
        }
        for (int i = 0; i < counts.length; i++) {
            System.out.println(counts[i]);
        }
    }



}
